import { reqCategoryList } from '../../api/index'


const state = {
  sum: 1,
  cateGoryList:[]
}
const mutations = {
  CATEGORYLIST(state,data){
    state.cateGoryList = data
  }
}
const actions = {
  async cetegoryList(context) {
    let res = await reqCategoryList()
    console.log(res);
    if(res.data.code === 200) {
      context.commit('CATEGORYLIST',res.data.data)
    }
  }
}
const getters = {

}


export default {
  namespaced: true,
  state,
  mutations,
  getters,
  actions
}